package com.cct.digitalarchapi.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cct.digitalarchapi.pojo.ArchApplication;

import com.cct.digitalarchapi.pojo.ArchCategory;
import com.cct.digitalarchapi.pojo.vo.ArchApplicationVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface ArchApplicationMapper extends BaseMapper<ArchApplication> {

    void addArchApplication(ArchApplication archApplication);

    IPage<ArchApplicationVo> qryAllApplication(IPage<ArchApplicationVo> page, @Param("appState") int appState ,@Param("archTitle") String archTitle);

    IPage<ArchApplicationVo> qryApplicationByStaff(IPage<ArchApplicationVo> page,@Param("staffCode") String staffCode,@Param("appState") int appState,@Param("archTitle") String archTitle);

    void  approveApplication(ArchApplication archApplication);

    int qryHaveApply(@Param("archMainId") int archMainId, @Param("staffCode") String staffCode ,@Param("appState") int appState);

    ArchApplication getApplyById(@Param("recid") int recid);

    void updateState(@Param("recid") int recid,@Param("state") int state);





}
